<!--
 * @Author: WangShuai 1830773767@qq.com
 * @Date: 2025-06-20 16:49:00
 * @LastEditors: WangShuai 1830773767@qq.com
 * @LastEditTime: 2025-06-21 22:51:38
 * @FilePath: \shangyitong\src\pages\home\card\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
	<div class="CardBox">
		<el-card shadow="hover" @click="goDatail">
			<div class="content">
				<div class="left">
					<div class="hospital_name">{{ hospitalInfo.hosname }}</div>
					<div class="tip">
						<!-- <span class="iconfont icon-icon"></span> -->
						<div class="level">
							<span class="iconfont icon-icon"></span>
							{{ hospitalInfo.param.hostypeString }}
						</div>
						<div class="time">
							<span class="iconfont icon-naozhong"></span>
							每天{{ hospitalInfo.bookingRule.releaseTime }}-{{
								hospitalInfo.bookingRule.quitTime
							}}放号
						</div>
					</div>
				</div>
				<div class="right">
					<img
						:src="`data:image/jpeg;base64,${hospitalInfo.logoData}`"
						alt=""
					/>
				</div>
			</div>
			<div></div>
		</el-card>
	</div>
</template>

<script setup lang="ts">
import {} from 'vue'
import { useRouter } from 'vue-router'
let $router = useRouter()
//接收父组件传递过来的数据
const props = defineProps({
	hospitalInfo: {
		type: Object,
		default: () => {
			return {}
		},
		require: true,
	},
})
//点击卡片跳转到医院详情页
const goDatail = () => {
	// props.hospitalInfo
	//跳转医院详情页面 携带医院编号hoscode
	$router.push({
		path: '/hospital/register',
		query: {
			hoscode: props.hospitalInfo.hoscode,
		},
	})
}
</script>

<style lang="scss" scoped>
.content {
	display: flex;
	justify-content: space-between;
	.right {
		img {
			width: 50px;
			height: 50px;
		}
	}
	.left {
		width: 70%;
		.tip {
			margin-top: 20px;
			display: flex;
			justify-content: space-between;
			color: #7f7f7f;
			.level,
			.time {
				display: flex;
				align-items: center;
				span {
					margin-right: 5px;
				}
			}
		}
	}
}
</style>
